 package com.saas.rmi.client;
 
 import java.rmi.Naming;
import java.util.Properties;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.saas.biz.commen.GetIP;
import com.saas.rmi.CollectInterface;

 public class CollectClient
{
	 Logger log = LoggerFactory.getLogger(CollectClient.class);
	 
   public boolean valitation(Properties props)
  {
     String result = "1";
     try {
       CollectInterface collect = (CollectInterface)Naming.lookup("rmi://www.jtcl88.com:1099/collect");
       result = collect.Collection(props);
    } catch (Exception e) {
      result = "1";
      log.debug("调用服务器端访问出现异常!!!");
     }
 
    return !result.equals("-1");
   }
   
   public static void main(String[] args)
   {
	   Properties props = GetIP.showSystemProperties();
	   String url = "http://www.baidu.com";
	   props.setProperty("url",url);
	   CollectClient c = new CollectClient();
	   boolean validate = c.valitation(props);
   }
 }

